package no.mehdi.game.service;

import no.mehdi.game.domain.Player;

/**
 * The Player services.
 * 
 * @author Mehdi Zare
 * 
 */
public interface PlayerServices {
	/**
	 * Return the player object by playerName if it stored in DB, else it will
	 * make a new player
	 * 
	 * @param playerName
	 *            the playerName
	 * @param password TODO
	 * @return {@link Player}
	 */
	public Player addPlayer(String playerName, String password);

	/**
	 * Retrieve a persisted player from DB.
	 * 
	 * @param playerName
	 * @return
	 */
	public Player retrievePlayerByName(String playerName);

	/**
	 * Update the player results like loss and win.
	 * 
	 * @param player
	 *            the {@link Player}
	 */
	public void updatePlayerResults(Player player);
}
